/*
 * addon.h
 *
 *  Created on: 2010-1-7
 *      Author: gavinkwoe
 */

#ifndef ADDON_TRACER_H_
#define ADDON_TRACER_H_

#include "addon_features.h"
#include "addon_std.h"
#include "addon_objbase.h"

/*************************************************************************
* INTERFACE
*************************************************************************/

ADDON_INTERFACE_( IAddonTracer, 1, IObject )
{
	__INHERIT_FROM( IObject )

	ADDON_METHOD( Trace )	( ADDON_REF(IObject) thiz, IN char * fmt, ... );
};

/*************************************************************************
* DECLARATION
*************************************************************************/

#if defined(__cplusplus)
extern "C" {
#endif	// #if defined(__cplusplus)

ADDON_IMPORT ADDON_REF(IObject)	addon_create_tracer( void * reserved );

#if defined(__cplusplus)
}
#endif	// #if defined(__cplusplus)

/*************************************************************************
* MACRO
*************************************************************************/

#define IAddonTracer_VTBL( p )		ADDON_GET_VTBL_(p, IAddonTracer)
#define IAddonTracer_CALL( p, a )	IAddonTracer_VTBL(p)->a
#define IAddonTracer_Trace( p )		IAddonTracer_CALL( p, Trace )

#endif /* ADDON_TRACER_H_ */
